<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Test18</title>
</head>
<body>
    <script type="text/javascript">
        var num1 =  parseInt( prompt("请输入一个数字"));
        if (num1%2==0){
            alert("您输入的数字是偶数");
        }else {
            alert("您输入的数字是奇数");
        }
    </script>
</body>
</html>